package jus.aor.mobilagent.kernel;

import java.io.IOException;
import java.io.InputStream;
import java.io.ObjectInputStream;
import java.io.ObjectStreamClass;


public class AgentInputStream extends ObjectInputStream{
	private BAMLoader loader;
	
	public AgentInputStream(InputStream s, BAMLoader bam) throws IOException{
		super(s);
		loader = bam;
	}

	@Override
	protected Class<?> resolveClass(ObjectStreamClass desc) throws IOException,
			ClassNotFoundException {
		return loader.loadClass(desc.getName());
	}
}
